Beacon Configuration Admin View, with CRUD and Regenerate and Revoke Tokens Actions#585
Draft
FionaLMcLaren wants to merge 23 commits intomainfrom
Draft
Beacon Configuration Admin View, with CRUD and Regenerate and Revoke Tokens Actions#585FionaLMcLaren wants to merge 23 commits intomainfrom
FionaLMcLaren wants to merge 23 commits intomainfrom
Conversation
…-api-keys - Removed old beacon migration that conflicted with device migrations - Updated BeaconsController to use Beacons::Creator service for API key generation - Changed beacon relationships from direct provider/tags to many-to-many beacon_providers and beacon_topics - Updated forms to use provider_ids and topic_ids multi-selects instead of single provider_id and tag_ids - Updated show page to display API key (when just created) instead of token - Updated index page to show region, language, provider count, and topic count - Removed beacon_tag model and references as we now use beacon_topics - Changed status from online/offline to active/revoked based on revoked_at timestamp
Topics use 'title' column, not 'name'. Updated controller and views to use Topic.active.order(:title)
- Update API key display messaging for admin context - Add regenerate_key action in BeaconsController using KeyRegenerator service - Add 'Regenerate API Key' button on show page with confirmation dialog - Full API key still shown only after creation/regeneration via flash - Clearer messaging that full key is displayed immediately after provisioning
- Added document_count method to Beacon model to count available topics - Added file_count method to count actual attached document files - Updated show page with 4 stat cards: Status, Available Topics, Document Files, and Configured Filters - Logic respects beacon's language, providers (or region if no providers), and topic filters
Resolves #572 Adds actions to revoke and regenerate tokens. Refactors the previous "regenerate" code in the controller to be in a model TODO: - Controller specs for beacons controller - Route for revoking a Token
FionaLMcLaren
commented
Feb 4, 2026
dbac880 to
ca83796
Compare
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add libffi-dev package to Dockerfile.dev for Alpine Linux to support ffi gem (dependency).
Allows Bundler to resolve dependencies for Darwin 25.
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean Marcia <seanmarcia@github.com>
2071a2e to
3954d6e
Compare
devjona
reviewed
Feb 4, 2026
devjona
reviewed
Feb 4, 2026
Collaborator
|
Hey @FionaLMcLaren for a ticket with so many visual elements, it's really helpful to put some screenshots in the PR description, particularly for:
Thanks! Solid work! |
devjona
reviewed
Feb 4, 2026
devjona
reviewed
Feb 4, 2026
devjona
reviewed
Feb 4, 2026
devjona
reviewed
Feb 4, 2026
Collaborator
devjona
left a comment
There was a problem hiding this comment.
Solid work! I left a few comments.
dmitrytrager
reviewed
Feb 4, 2026
Collaborator
dmitrytrager
left a comment
There was a problem hiding this comment.
have some comments, mostly about code validation and data integrity
9931cda to
a628a77
Compare
a628a77 to
a24368c
Compare
81601e1 to
8dd9f8e
Compare
b3dfd30 to
cd9ea07
Compare
cd9ea07 to
2464541
Compare
| put :provider, on: :collection | ||
| end | ||
|
|
||
| scope module: :beacons do |
Collaborator
There was a problem hiding this comment.
Try using
resources :beacons, except: :destroy, module: :beacons do
...
endWithout "scope" it should not change your routing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Issue Does This PR Cover, If Any?
Resolves #572
What Changed? And Why Did It Change?
This PR adds the actions to revoke and regenerate tokens. It refactors the previous
"regenerate" code in the controller to be in a model. These actions are accessible to an admin user on their Admin Dashboard, when viewing a Beacon. This PR also does some cleanup on the views here, e.g.: removing the flashes for
:api_key, as the information is already included in the success flashHow Has This Been Tested?
RSpec
Please Provide Screenshots